﻿/* 
 * Since 2008 - 2012
 */

package com.hh.bss.project.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.project.dao.*;
import com.hh.bss.project.entity.*;
import com.hh.bss.project.service.*;
import com.hh.bss.project.vo.query.*;
import com.hh.bss.util.*;




@Service
@Transactional
public class ContractJobCvJdServiceImpl extends BaseBusinessService<ContractJobCvJd,java.lang.Integer>  implements ContractJobCvJdService<ContractJobCvJd,java.lang.Integer>{

	private ContractJobCvJdDao contractJobCvJdDao;
	/**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性,请注意大小写*/
	public void setContractJobCvJdDaoImpl(ContractJobCvJdDao dao) {
		this.contractJobCvJdDao = dao;
	}
	public EntityDao getEntityDao() {
		return this.contractJobCvJdDao;
	}
	
	@Transactional(readOnly=true)
	public Page findPage(ContractJobCvJdQuery query) {
		return contractJobCvJdDao.findPage(query);
	}
	
	public ContractJobCvJd getContractJobCvJd(Integer jobId, Integer cvId) {
		// TODO Auto-generated method stub
		List values=new ArrayList();
		values.add(jobId);
		values.add(cvId);
		ContractJobCvJd contractJobCvJd=null;
		List l=contractJobCvJdDao.getHibernateTemplate().find("from ContractJobCvJd t where t.jobId=? and t.cvId=? ", values.toArray());
		if (l!=null&&l.size()>0) {
			contractJobCvJd=(ContractJobCvJd)l.get(0);
		}
		return contractJobCvJd;
	}
	
}
